package com.idealighter.game.server.db.datadb.generate.mapper;

import com.idealighter.game.server.db.datadb.generate.domain.RoomCardGameCfgDomain;
import com.idealighter.game.server.db.datadb.generate.domain.RoomCardGameCfgDomainExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface RoomCardGameCfgDomainMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @SelectProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="countByExample")
    long countByExample(RoomCardGameCfgDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @DeleteProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="deleteByExample")
    int deleteByExample(RoomCardGameCfgDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Delete({
        "delete from room_card_game_cfg",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Insert({
        "insert into room_card_game_cfg (game_id, version, ",
        "game_cfgs)",
        "values (#{gameId,jdbcType=INTEGER}, #{version,jdbcType=INTEGER}, ",
        "#{gameCfgs,jdbcType=LONGVARCHAR})"
    })
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insert(RoomCardGameCfgDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @InsertProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="insertSelective")
    @SelectKey(statement="SELECT LAST_INSERT_ID()", keyProperty="id", before=false, resultType=Integer.class)
    int insertSelective(RoomCardGameCfgDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @SelectProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="selectByExampleWithBLOBs")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="game_id", property="gameId", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="game_cfgs", property="gameCfgs", jdbcType=JdbcType.LONGVARCHAR)
    })
    List<RoomCardGameCfgDomain> selectByExampleWithBLOBs(RoomCardGameCfgDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @SelectProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="game_id", property="gameId", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER)
    })
    List<RoomCardGameCfgDomain> selectByExample(RoomCardGameCfgDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Select({
        "select",
        "id, game_id, version, game_cfgs",
        "from room_card_game_cfg",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="id", property="id", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="game_id", property="gameId", jdbcType=JdbcType.INTEGER),
        @Result(column="version", property="version", jdbcType=JdbcType.INTEGER),
        @Result(column="game_cfgs", property="gameCfgs", jdbcType=JdbcType.LONGVARCHAR)
    })
    RoomCardGameCfgDomain selectByPrimaryKey(Integer id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") RoomCardGameCfgDomain record, @Param("example") RoomCardGameCfgDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="updateByExampleWithBLOBs")
    int updateByExampleWithBLOBs(@Param("record") RoomCardGameCfgDomain record, @Param("example") RoomCardGameCfgDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") RoomCardGameCfgDomain record, @Param("example") RoomCardGameCfgDomainExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @UpdateProvider(type=RoomCardGameCfgDomainSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(RoomCardGameCfgDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Update({
        "update room_card_game_cfg",
        "set game_id = #{gameId,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER},",
          "game_cfgs = #{gameCfgs,jdbcType=LONGVARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKeyWithBLOBs(RoomCardGameCfgDomain record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table room_card_game_cfg
     *
     * @mbg.generated Sat Jun 23 19:49:58 CST 2018
     */
    @Update({
        "update room_card_game_cfg",
        "set game_id = #{gameId,jdbcType=INTEGER},",
          "version = #{version,jdbcType=INTEGER}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(RoomCardGameCfgDomain record);
}